﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="MenuEdit.aspx.cs" Inherits="Admin_Modules_Menu_MenuEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c" runat="Server">
    <div class="wrap">
        <div id="icon-edit" class="icon32 icon32-posts-post">
            <br />
        </div>
        <h2>Edit Menu</h2>
        <div id="wpbody-content">
            <table class="form-table">
                <tbody>
                    <tr class="form-field form-required">
                        <th scope="row" valign="top">
                            <label for="name">
                                Name</label>
                        </th>
                        <td>
                            <%--<input name="name" id="name" type="text" value="" size="40" aria-required="true">--%>
                            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ControlToValidate="txtName" ID="rname" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <p class="description">
                                The name is how it appears on your site.
                            </p>
                        </td>
                    </tr>
                    <tr class="form-field">
                        <th scope="row" valign="top">
                            <label for="slug">
                                Url</label>
                        </th>
                        <td>
                            <asp:TextBox ID="txtUrl" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ControlToValidate="txtUrl" ID="rslug" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <%--<p class="description">
                                The “slug” is the URL-friendly version of the name. It is usually all lowercase
                                and contains only letters, numbers, and hyphens.
                            </p>--%>
                        </td>
                    </tr>
                    <tr class="form-field">
                        <th scope="row" valign="top">
                            <label for="parent">
                                Parent</label>
                        </th>
                        <td>
                            <asp:DropDownList ID="ddlparent" runat="server" ClientIDMode="Static" AutoPostBack="false"
                                AppendDataBoundItems="true">
                                <asp:ListItem Value="-1">None</asp:ListItem>
                            </asp:DropDownList>
                            <%--<br>
                            <span class="description">Categories, unlike tags, can have a hierarchy. You might have
                                a Jazz category, and under that have children categories for Bebop and Big Band.
                                Totally optional.</span>--%>
                        </td>
                    </tr>
                    <tr class="form-field">
                        <th scope="row" valign="top">
                            <label for="description">
                                Display Order</label>
                        </th>
                        <td>
                            <%--<textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"></textarea>--%>
                            <asp:TextBox ID="txtDisplayOrder" runat="server" Width="50"></asp:TextBox>
                            <asp:RequiredFieldValidator ControlToValidate="txtDisplayOrder" ID="r1" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="re1" ControlToValidate="txtDisplayOrder" runat="server" ErrorMessage="*" ValidationExpression="\d{1,10000}"></asp:RegularExpressionValidator>
                            <%--<br>
                            <span class="description">The description is not prominent by default, however some
                                themes may show it.</span>--%>
                        </td>
                    </tr>
                    <tr class="form-field">
                        <th scope="row" valign="top">
                            <label for="description">
                                Description</label>
                        </th>
                        <td>
                            <%--<textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"></textarea>--%>
                            <asp:TextBox ID="txtDescription" TextMode="MultiLine" runat="server" Height="100"></asp:TextBox>
                            <%--<br>
                            <span class="description">The description is not prominent by default, however some
                                themes may show it.</span>--%>
                        </td>
                    </tr>

                </tbody>
            </table>
            <p class="submit">
                <%--<input type="submit" name="submit" id="submit" class="button-primary" value="Update">--%>
                <asp:Button ID="btnUpdate" runat="server" CssClass="button-primary"
                    Text="Update" OnClick="btnUpdate_Click" />
                <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
            </p>
            <h2><a href="Default.aspx">List Menu</a></h2>
        </div>
    </div>
</asp:Content>
